package com.qjd.girl.utils;

import com.qjd.girl.domain.Girl;
import com.qjd.girl.domain.Result;

/**
 * Created by qiangjindong
 * 2018-08-03 20:39
 */
public class ResultUtil {

    public static <T> Result<T> success(Girl obj) {
        Result result = new Result();
        result.setCode(0);
        result.setMessage("成功");
        result.setData(obj);
        return result;
    }

    public static Result success() {
        return ResultUtil.success(null);
    }

    public static Result error(Integer code, String message) {
        Result result = new Result();
        result.setCode(code);
        result.setMessage(message);
        return result;
    }
}
